<?php
session_start();

require_once("database.include.php");

	print "Invitations (table group_invitation)<br/><table border=`1`>";
	print "<tr><td bgcolor=darkgray><font color=white>invitation_id</font></td>
	<td bgcolor=darkgray><font color=white>inviting_user_name</font></td>
	<td bgcolor=darkgray><font color=white>invited_user_name</font></td>
	<td bgcolor=darkgray><font color=white>group_name</font></td>
	<td bgcolor=darkgray><font color=white>encrypted_group_private_key</font></td></tr>";
	
    $sql = 'SELECT `invitation_id`, `inviting_user_name`, `invited_user_name`, `group_name`, `encrypted_group_private_key` FROM `group_invitation` ORDER BY `invitation_id`';
    
    foreach ($conn->query($sql) as $row) {
    	print "<tr>";
        print "<td>" . $row['group_name'] . "</td>";
        print "<td>" . $row['group_name'] . "</td>";
        print "<td>" . $row['group_name'] . "</td>";
        print "<td>" . $row['group_name'] . "</td>";
        print "<td>" . $row['group_name'] . "</td>";
        print "</tr>";
    }
    print "</table>";

?>